package security.transcation;

import java.util.ArrayList;
import java.util.List;

import core.transcation.IReadTranscation;

import security.web.controller.MenuItem;

/**
 * 查询菜单的实现类
 * 
 * @author Edgar
 * 
 */
public class MenuItemQueryTranscation implements
		IReadTranscation {

	@Override
	public List<MenuItem> execute() {
		List<MenuItem> menus = new ArrayList<MenuItem>();
		MenuItem menuItem = new MenuItem();
		menuItem.setName("业务办理");
		menuItem.setLeaf(false);
		MenuItem i = new MenuItem();
		i.setName("用户一览");
		i.setUrl("/myapp/AlarmUserController.do");
		i.setIcon("icon-list-alt");
		i.setLeaf(true);
		menuItem.addChildren(i);
		i = new MenuItem();
		i.setName("开户");
		i.setIcon("icon-edit");
		i.setLeaf(true);
		menuItem.addChildren(i);
		menus.add(menuItem);

		menuItem = new MenuItem();
		menuItem.setName("财务管理");
		menuItem.setLeaf(false);
		i = new MenuItem();
		i.setName("出账");
		i.setIcon("icon-list-alt");
		i.setLeaf(true);
		menuItem.addChildren(i);
		i = new MenuItem();
		i.setName("账单管理");
		i.setIcon("icon-edit");
		i.setLeaf(true);
		menuItem.addChildren(i);
		menus.add(menuItem);
		return menus;
	}
}
